Red Hat Enterprise, CentOS, Scientific Linux

Red Hat Enterprise, Scientific Linux, and CentOS offer the same Linux environment for applications, so the Macaulay2 distributions in this directory should work on all of them. The version numbers correspond this way: "Scientific Linux 5.3" is based on "Red Hat Enterprise Linux 5 update 3".

We have arranged for automatic installation of Macaulay 2 on Red Hat systems, and the method is be explained here. Whether you install manually or automatically, it is a good idea first to install the Macaulay2 public key, which "rpm" will use to verify the integrity of the files available here.

To install Macaulay2 automatically, you first add our repository to your list of software repositories. Do this by downloading the file Macaulay2-6.repo (for CentOS version 6.* ) or Macaulay2-7.repo (for CentOS version 7.* ) or Macaulay2-8.repo (for CentOS version 8.* ) and placing it in your directory /etc/yum.repos.d. (This has changed recently, sorry for the incompatibility!) Then run

       sudo yum update
       sudo yum install Macaulay2

Oddly, it seems that

       touch /etc/yum.repos.d
or
       yum makecache
can have a beneficial effect if "yum update", later on, doesn't download the latest version of Macaulay2.

You may also install the package files manually (they all have names of the form *.rpm), but they come in pairs, one containing the architecture dependent files (in this directory), and one containing the architecture independent files and having "common" in the name. The latter files can be obtained in Common/, and the former files are listed here:

Here are sample commands for manually installing Macaulay2 from downloaded *.rpm files. (Replace "1.6" by the current version number, "x86_64" by your architecture, and "RedHatEnterprise-4" by the issue.)

        sudo rpm -i -v Macaulay2-1.6-common.rpm
        sudo rpm -i -v Macaulay2-1.6-x86_64-Linux-RedHatEnterprise-4.rpm

Here are sample commands for manually uninstalling Macaulay2. (Replace "1.6" by the current version number.)

	sudo rpm -e -v Macaulay2-1.6
	sudo rpm -e -v Macaulay2-common-1.6

The commands above require root permission, because they install Macaulay2 under /usr. But Macaulay2 can be installed anywhere by an ordinary user, provided the packages containing the sharable libraries it uses have already been installed, with a sequence of instructions something like this:

	mkdir temp
	cd temp
	rpm2cpio /tmp/Macaulay2-1.8-1.x86_64-Linux-ScientificLinux-6.6.rpm | cpio -idm --no-absolute-filenames
	rpm2cpio /tmp/Macaulay2-1.8-1.common.rpm | cpio -idm --no-absolute-filenames
	mv usr ~/foo/bar/
	cd ..
	rmdir temp
Now start
        ~/foo/bar/bin/M2
and use the Macaulay2 command
        setup()
to record the location of M2 in your login startup files.